package com.demo.widget.bean;

import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

/**
 * desc:
 * author: wens
 * date: 2018/5/30.
 */
public class SmallVideoBean implements Sequenceable {
    public String coverUrl;
    public String title;
    public String videoUrl;

    public static final Sequenceable.Producer PRODUCER = new Producer<SmallVideoBean>() {
        @Override
        public SmallVideoBean createFromParcel(Parcel parcel) {
            SmallVideoBean smallVideoBean = new SmallVideoBean();
            smallVideoBean.unmarshalling(parcel);
            return smallVideoBean;
        }
    };

    public SmallVideoBean() {
    }

    @Override
    public boolean marshalling(Parcel parcel) {
        return parcel.writeString(coverUrl) && parcel.writeString(title) && parcel.writeString(videoUrl);
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.coverUrl = parcel.readString();
        this.title = parcel.readString();
        this.videoUrl = parcel.readString();
        return true;
    }



}
